package org.apache.flink.runtime.resourceconsumer;

import org.apache.flink.runtime.slotpool.PhysicalSlot;
import org.apache.flink.runtime.slotpool.PhysicalSlotProvider;
import org.apache.flink.runtime.slotpool.SlotPool;
import org.apache.flink.util.AbstractID;

/**
 * This ID identifies the request for a slot from the BusinessExecution to the {@link SlotPool} or {@link
 * PhysicalSlotProvider}. There are various slot types like {@link PhysicalSlot}, {@link
 * LogicalSlot} or {@code SharedSlot} in the case of slot sharing.
 *
 * <p>This ID serves a different purpose than the {@link
 * org.apache.flink.runtime.clusterframework.types.AllocationID AllocationID}, which identifies the
 * request of a physical slot, issued from the SlotPool via the ResourceManager to the TaskManager.
 */
public final class SlotRequestId extends AbstractID {

    private static final long serialVersionUID = -6072105912250154283L;

    public SlotRequestId(long lowerPart, long upperPart) {
        super(lowerPart, upperPart);
    }

    public SlotRequestId() {}

    @Override
    public String toString() {
        return "SlotRequestId{" + super.toString() + '}';
    }
}
